﻿Imports System
Imports System.Globalization

Namespace System.Workflow.Activities.Rules
    Friend Class StringArithmeticLiteral
        Inherits ArithmeticLiteral
        ' Methods
        Friend Sub New(ByVal literalValue As String)
            Me.m_value = literalValue
            MyBase.m_type = GetType(String)
        End Sub

        Friend Overrides Function Add() As Object
            Return Me.m_value
        End Function

        Friend Overrides Function Add(ByVal v As Boolean) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As Char) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As Decimal) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As Double) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As Integer) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As Long) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As Single) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As String) As Object
            Return (v & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As UInt16) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As UInt32) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As UInt64) As Object
            Return (v.ToString(CultureInfo.CurrentCulture) & Me.m_value)
        End Function

        Friend Overrides Function Add(ByVal v As ArithmeticLiteral) As Object
            Return v.Add(Me.m_value)
        End Function


        ' Properties
        Friend Overrides ReadOnly Property Value As Object
            Get
                Return Me.m_value
            End Get
        End Property


        ' Fields
        Private m_value As String
    End Class
End Namespace

